package discount;

public class Discount {

	private static final double HIGH_DISCOUNT_THRESHOLD = 128;
	private static final double HIGH_DISCOUNT = 0.92;
	private static final double LOW_DISCOUNT = 0.84;
	private double discountRate;
	
	public double discount(double origPrice){
		if(origPrice < HIGH_DISCOUNT_THRESHOLD)
			discountRate = HIGH_DISCOUNT;
		else
			discountRate = LOW_DISCOUNT;
		return discountRate * origPrice;
	}
}
